﻿using System.Collections.Generic;

namespace MyAMS.WebServer
{
    /// <summary>
    /// 模块管理器
    /// </summary>
    public interface IModulesManager : IComponent
    {
        /// <summary>
        /// 获取环境加载器
        /// </summary>
        IEnvironmentLoader EnvironmentLoader { get; }

        /// <summary>
        /// 获取模块集合
        /// </summary>
        IEnumerable<IModule> Modules { get; }

        /// <summary>
        /// 获取模块的数量
        /// </summary>
        int ModuleCount { get; }

        /// <summary>
        /// 加载模块
        /// </summary>
        /// <param name="module">模块</param>
        void Load(IModule module);

        /// <summary>
        /// 卸载模块
        /// </summary>
        /// <param name="module">模块</param>
        void UnLoad(IModule module);
    }
}
